function clickSRV(objId) {
	displaying = $(objId).css("display");
	if(displaying == "none"){
		$(objId).fadeIn(1000);
        $(objId).parent().css("z-index","3");
        $(objId).parent().find("img").css("-webkit-transform","scale(1.15,1.15)");
	} else {
		$(objId).fadeOut(1000);
        $(objId).parent().css("z-index","2");
        //$(objId).parent().find("img").css("-webkit-transition","width 1.5s, height 1.5s, -webkit-transform 1.5s");
        $(objId).parent().find("img").css("-webkit-transform","");
	}
}
	
function releseAllSRV2(objId) {
	$(".modal").each(function(){
		$(this).cleanAllSRV(objId);
	});
//	$(".modal").cleanAllSRV(objId);
}
	
$(document).ready(function(){
    $(".servicio").click(function(){
		releseAllSRV2(this.querySelector(".modal").id);
		clickSRV("#"+this.querySelector(".modal").id);
        return false;
	});
	
    $(".closeBtn").click(function() {
		//clickSRV('#'+this.parentNode.id);
		releseAllSRV2();
        return false;
    });
});

$.fn.cleanAllSRV = function(easing, callback) {
		if(easing != $(this).attr('id')){
			displaying = this.css("display");
			if(displaying != "none"){
				this.fadeOut('slow');
				this.css("display","none");
                this.parent().find("img").css("-webkit-transform","");
			}
		}
};
